<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	#{stylesheet 'main.css' /}
	#{stylesheet 'jquery-ui/jquery-ui.css' /}
	#{stylesheet 'jquery.dataTables.css' /}
	#{stylesheet 'jHtmlArea.css' /}
	#{stylesheet 'jquery.gritter.css' /}
		
	#{script 'jquery-1.6.4.min.js' /}
	#{script 'jquery-ui.js' /}
	#{script 'jquery.dataTables.min.js' /}
	#{script 'jHtmlArea-0.7.0.min.js' /}  
	#{script 'jquery.gritter.min.js' /}
	
	#{script 'collaborator/common.js' /}
	#{script 'collaborator/notifications.js' /}
	#{script 'collaborator/identity.js' /}
	#{script 'collaborator/missions.js' /}
	#{script 'collaborator/formations.js' /}
	#{script 'collaborator/languages.js' /}	
	
	<title>Collaborator Profile</title>
</head>

<body>
	<script type="text/javascript">
		var delFormation = #{jsAction @deleteFormation(':formationID') /};
		var delMission = #{jsAction @deleteMission(':missionID') /};
	</script>

	<div id="header">
		#{header user:user /}
	</div>
	<br />

	<div id="notifications_panel">
		#{notificationArea /}
	</div>

	<br />
	<div id="identity">
		Bonjour ${collab.getValidProfile().getName()} <br /> <br />

		<div id="identity_title" class="panel_title">
			Etat civil <br /> 
			<input id="display_identity_panel" type="submit"
				onclick="javascript:hide('identity_panel', 'display_identity_panel');"
				value="Afficher" />
		</div>

		<!-- modifying  the Etat Civil information -->
		<div id="identity_edit_panel" class="hidden">
			#{Collaborator/collaboratorIdentity mode:'edit', collaborator:collab, tools:tools /}
		</div>
		
		<!-- showing the Etat Civil information -->
		<div id="identity_panel" class="hidden">
			#{Collaborator/collaboratorIdentity mode:'display', collaborator:collab, tools:tools, canEdit:canEdit /}
		</div>
	</div>

	<div id="skills" class="panel_title">
		Compétences <br /> 
			<input id="display_skills_panel"  type="submit"  value="Afficher"  onclick="javascript:hide('skills_panel', 'display_skills_panel');"/>
			<div id ="skills_panel" class="hidden">
				<br/>
				#{Collaborator/collaboratorSkills mode:'display', collaborator:collab, tools:tools /}
				<br/>
			</div>
	</div>

	<div id="missions">
		<div class="panel_title">
			Missions <br /> 
			<input id="display_missions_panel" type="submit" value="Afficher" onclick="javascript:hide('missions_panel', 'display_missions_panel');"/>
		</div>
		<div id="missions_panel" class="hidden">
			#{Collaborator/collaboratorMissions mode:'display', collaborator:collab, tools:tools, canEdit:canEdit /}
			#{if canEdit == true}
				<input id="add_mission_bt" type="submit"
							onclick="javascript:showAddMissionPanel()" value="Ajouter une mission" />
			#{/if}
		</div>
		<div id="add_mission_panel" class="hidden">
				#{Collaborator/collaboratorMissions mode:'add', collaborator:collab, clients:clients, tools:tools /}
		</div>
		<div id="update_mission_panel" class="hidden">
				#{Collaborator/collaboratorMissions mode:'edit', clients:clients, tools:tools /}
		</div>
	</div>

	<div id="formations">
		<div class="panel_title">
			Formations<br /> 
			<input id="display_formations_panel" type="submit" value="Afficher" onclick="javascript:hide('formations_panel', 'display_formations_panel');"/>
		</div>
		<div id="formations_panel" class="hidden">
			#{Collaborator/collaboratorFormations mode:'display', collaborator:collab, tools:tools, canEdit:canEdit /}
			#{if canEdit == true}
				<input id="add_formation_bt" type="submit"
							onclick="javascript:showAddFormationPanel()" value="Ajouter une formation" />
			#{/if}
		</div>
		<div id="add_formation_panel" class="hidden">
			#{Collaborator/collaboratorFormations mode:'add', collaborator:collab, tools:tools /}
		</div>
		<div id="update_formation_panel" class="hidden">
			#{Collaborator/collaboratorFormations mode:'edit', tools:tools /}
		</div>
	</div>
	
	<div id="languages">
		<div class="panel_title">
			Langues <br /> 
			<input id="display_languages"  type="submit"  value="Afficher" onclick="javascript:hide('languages_panel', 'display_languages');"/>
		</div>
		<div id="languages_panel" class="hidden">
			#{Collaborator/collaboratorLanguages mode:'display', languages:languages /}
			#{if canEdit == true}
            	<input id="add_language_bt" type="submit" style='margin-left: 50%' margin-right: auto' onclick="javascript:showLanguagesPanel()" value="Modifier" />
            #{/if}
	    </div>
        <div id="add_language_panel" class="hidden">
			#{Collaborator/collaboratorLanguages mode:'add', languages:languages /}
		</div>
	</div>

	<br/>
	<div id="footer">
		#{footer /}
	</div>
</body>
</html>
